﻿using Microsoft.EntityFrameworkCore.Migrations;

namespace FinancialReportPowerPointAddIn.Migrations
{
    public partial class _20241111 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "BalanceSheets",
                columns: table => new
                {
                    BalanceSheetId = table.Column<int>(nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    Year = table.Column<int>(nullable: false),
                    Month = table.Column<int>(nullable: false),
                    Restaurant = table.Column<string>(nullable: true),
                    货币资金 = table.Column<decimal>(nullable: false),
                    短期投资 = table.Column<decimal>(nullable: false),
                    应收账款 = table.Column<decimal>(nullable: false),
                    预付款项 = table.Column<decimal>(nullable: false),
                    其他应收款 = table.Column<decimal>(nullable: false),
                    存货 = table.Column<decimal>(nullable: false),
                    固定资产账面价值 = table.Column<decimal>(nullable: false),
                    无形资产 = table.Column<decimal>(nullable: false),
                    长期待摊费用 = table.Column<decimal>(nullable: false),
                    应付账款 = table.Column<decimal>(nullable: false),
                    应付职工薪酬 = table.Column<decimal>(nullable: false),
                    应交税费 = table.Column<decimal>(nullable: false),
                    其他应付款 = table.Column<decimal>(nullable: false),
                    长期借款 = table.Column<decimal>(nullable: false),
                    实收资本 = table.Column<decimal>(nullable: false),
                    未分配利润 = table.Column<decimal>(nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_BalanceSheets", x => x.BalanceSheetId);
                });

            migrationBuilder.CreateTable(
                name: "ProfitSheets",
                columns: table => new
                {
                    ProfitSheetId = table.Column<int>(nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    Year = table.Column<int>(nullable: false),
                    Month = table.Column<int>(nullable: false),
                    Restaurant = table.Column<string>(nullable: true),
                    主营业务收入 = table.Column<decimal>(nullable: false),
                    主营业务成本 = table.Column<decimal>(nullable: false),
                    其他业务收入 = table.Column<decimal>(nullable: false),
                    其他业务成本 = table.Column<decimal>(nullable: false),
                    销售费用 = table.Column<decimal>(nullable: false),
                    管理费用 = table.Column<decimal>(nullable: false),
                    财务费用 = table.Column<decimal>(nullable: false),
                    营业外收入 = table.Column<decimal>(nullable: false),
                    营业外支出 = table.Column<decimal>(nullable: false),
                    所得税费用 = table.Column<decimal>(nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_ProfitSheets", x => x.ProfitSheetId);
                });
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "BalanceSheets");

            migrationBuilder.DropTable(
                name: "ProfitSheets");
        }
    }
}
